import {
    shallowRef
} from 'vue' ;

export default () => {

    const 
        props = shallowRef(),
        visible = shallowRef(false);

    return {
        props,
        visible,
        show(params){

            props.value = params ;

            visible.value = true ;
        },

        close(){

            props.value = null ;

            visible.value = false ;
        }

    } ;

}